<template>
	<view class="wrapper">
		<div class="main fWrap flex-start" >
			<image :src="v" mode="aspectFill" class="cover" v-for="(v,i) in list" :key="i" lazy-load @click="prevImg(i)"></image>
		</div>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:{}
			};
		},
		onLoad() {
			this.list = uni.getStorageSync('trailerlist')
			let that = this
			uni.setNavigationBarTitle({
				title: `剧照`
			})
		},
		methods: {
			prevImg(i){
				let that = this
				uni.previewImage({
					urls: that.list.trailerlist,
					current: i
				})
			},
			click(item) {
				console.log('item', item);
			}
		}
	}
</script>

<style lang="scss" scoped>
	.main{
		padding: 8rpx;
		.cover{
			width: 177rpx;
			height: 177rpx;
			margin-bottom: 8rpx;
			&:not(:nth-of-type(4n)){
				margin-right: 8rpx;
			}
		}
	}
	.header {
		width: 100%;
		left: 0;
		top: 0;
		/* #ifdef H5 */
		top: 44px;
		/* #endif */
		box-shadow: 0 2rpx 10rpx 1rpx #e0e0e1;
	}
</style>